//
//  BTMarchs.h
//  BaxTer
//
//  Created by 陈武琦 on 16/8/30.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#ifndef BTMarchs_h
#define BTMarchs_h




#define cwqGetCustomHeight(height) (height/320.0 *kScreenWidth + 64)
#define BWB_iPhone6 ([UIScreen mainScreen].bounds.size.width/375)


#define kKeyboardHeight 216

#define kBtnColor HexRGB_WSJ(23, 110, 147)

#define weakSelf_define __weak typeof(self) weakSelf =self
#define defineWeakSelf __weak typeof(self) weakSelf =self
#define HexRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define HexRGBAlpha(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)]
#define HexRGB_WSJ(x,y,z) [UIColor colorWithRed:(x)/255.0 green:(y)/255.0 blue:(z)/255.0 alpha:1.0]

#define kAppBg [UIColor whiteColor]
#define kTxtColor HexRGB(0x5e606d)
#define kBorderColor HexRGB(0xdedede)
#define kMainColor HexRGB_WSJ(9, 78, 145)

#define kScreenHeight   ([UIScreen mainScreen].bounds.size.height)
#define kScreenWidth    ([UIScreen mainScreen].bounds.size.width)
#define kScreenFrame    (CGRectMake(0,0,kScreenWidth,kScreenHeight))
#define kScreenFactor   (kScreenHeight <= 568.0 ? 1.0 : kScreenHeight / 568.0);
#define kWithOutNanBarFrame    (CGRectMake(0,64,kScreenWidth,kScreenHeight-64))
#define kOnePX (1.0/[UIScreen mainScreen].scale)
#define BT_USERID [[HELAppManager userInfo] id]

//获取View的属性
#define GetViewWidth(view)  view.frame.size.width
#define GetViewHeight(view) view.frame.size.height
#define GetViewX(view)      view.frame.origin.x
#define GetViewY(view)      view.frame.origin.y

// MainScreen Height&Width
#define Main_Screen_Height      [[UIScreen mainScreen] bounds].size.height
#define Main_Screen_Width       [[UIScreen mainScreen] bounds].size.width

// 字体大小(常规/粗体)
#define BOLDSYSTEMFONT(FONTSIZE)[UIFont boldSystemFontOfSize:FONTSIZE]
#define SYSTEMFONT(FONTSIZE)    [UIFont systemFontOfSize:FONTSIZE]
#define FONT(NAME, FONTSIZE)    [UIFont fontWithName:(NAME) size:(FONTSIZE)]

// 当前版本
#define FSystemVersion          ([[[UIDevice currentDevice] systemVersion] floatValue])
#define DSystemVersion          ([[[UIDevice currentDevice] systemVersion] doubleValue])
#define SSystemVersion          ([[UIDevice currentDevice] systemVersion])

// 是否大于等于IOS7
#define isIOS7                  ([[[UIDevice currentDevice]systemVersion]floatValue] >= 7.0)
// 是否IOS6
#define isIOS6                  ([[[UIDevice currentDevice]systemVersion]floatValue] < 7.0)
// 是否大于等于IOS8
#define isIOS8                  ([[[UIDevice currentDevice]systemVersion]floatValue] >=8.0)
// 是否大于IOS9
#define isIOS9                  ([[[UIDevice currentDevice]systemVersion]floatValue] >=9.0)
// 是否iPad
#define isPad                   (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)


#define font(x) [UIFont systemFontOfSize:x]
#define wsj_cornerRadius(view,value)   \
view.layer.cornerRadius =value;\
view.layer.masksToBounds = YES\

#define IsNilString(__String) (__String==nil || [__String isEqualToString:@""] || [[__String stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] isEqualToString:@""])//判读是否是空字符

#define IsNilArray(__Array) (__Array==nil || ([__Array count] == 0) || !__Array) //判断是否是空数组



#ifdef DEBUG

#define Log(xx, ...) NSLog(@"%s(%d): " xx, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

#else

#define Log(xx, ...)

#endif

#endif /* BTMarchs_h */
